#ifndef GLWIDGET_H
#define GLWIDGET_H

#include "Troll3D/Application.h"
#include "Troll3D/View.h"
#include "heightmap.h"
#include "math.h"
#include <QGLWidget>
#include <QMouseEvent>
#include <QWheelEvent>
#include "Troll3D/TrackView.h"



class GlWidget  :   QGLWidget
{
    public:

    GlWidget(QWidget * fatherWidget);

    int anchorX;
    int anchorY;

    bool isMoving;

    void paintGL();
    void initializeGL();
    void resizeGL(int w, int h);

    /***********************************
    /*          Methods
    /***********************************/

    void mouseMoveEvent(QMouseEvent * e);
    void mouseReleaseEvent(QMouseEvent * e);
    void wheelEvent(QWheelEvent * e);

    /*! @brief This method will initialize the GLWidget for desired version of opengl */
    void SetOpenGLVersion(int major, int minor);

};

#endif // GLWIDGET_H
